package com.demoworld;


import org.junit.Assert;
import org.junit.Test;

/**
 * Created by francis on 2017/6/14.
 * 字符串 操作举例
 */
public class StringTest {
    private String key = "white-tiger-string";
    private String value = "white-tiger";

    //添加字符串到 redis
    @Test
    public void add() {
        CacheHelper.INSTANCE.set(key, value);
        Assert.assertEquals(value, CacheHelper.INSTANCE.get(key));
    }

    //查询 一个保存在redis中的 字符串
    @Test
    public void get() {
        CacheHelper.INSTANCE.set(key, value);
        System.out.println(CacheHelper.INSTANCE.get(key));
    }

}
